forum

Home / DeveloperSection / Forums / How to deal with checked exception (UnsupportedEncodingException) that can never occurs?

How to deal with checked exception (UnsupportedEncodingException) that can never occurs?

Anonymous User229316-Nov-2014

I am trying transform a string to UTF-8 encoding. But the compilation fails because some code "throws UnsupportedEncodingException".

String s = "1,2,3,4";

String smsext = new String(s.getBytes(),"UTF-8");

how to solve this ?


Updated on 17-Nov-2014
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By